import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '*',
    redirect: '/',
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      title:'nav_home'
    },
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
    meta:{
      title:'nav_about'
    }
  },
  {
    path: '/people',
    name: 'People',
    component: () => import(/* webpackChunkName: "people" */ '../views/People.vue'),
    meta:{
      title:'nav_people'
    },
  },
  {
    path: '/peopleInfo',
    name: 'PeopleInfo',
    component: () => import(/* webpackChunkName: "peopleInfo" */ '../views/People/peopleInfo.vue'),
    meta:{
      title:'nav_people'
    },
  },
  {
    path: '/research',
    name: 'Research',
    component: () => import(/* webpackChunkName: "research" */ '../views/Research.vue'),
    meta:{
      title:'nav_research'
    },
  },
  {
    path: '/researchDetail',
    name: 'ResearchDetail',
    component: () => import(/* webpackChunkName: "researchDetail" */ '../views/Research/researchDetail.vue'),
    meta:{
      title:'nav_research'
    },
  },
  {
    path: '/new',
    name: 'New',
    component: () => import(/* webpackChunkName: "new" */ '../views/New.vue'),
    meta:{
      title:'nav_new'
    },
  },
  {
    path: '/newDetail',
    name: 'NewDetail',
    component: () => import(/* webpackChunkName: "newDetail" */ '../views/New/newDetail.vue'),
    meta:{
      title:'nav_new'
    },
  },
  {
    path: '/recruitment',
    name: 'Recruitment',
    component: () => import(/* webpackChunkName: "recruitment" */ '../views/Recruitment.vue'),
    meta:{
      title:'nav_recruitment'
    },
  },
  {
    path: '/reserve',
    name: 'Reserve',
    component: () => import(/* webpackChunkName: "reserve" */ '../views/Reserve.vue'),
    meta:{
      title:'nav_reserve'
    },
  },
  {
    path: '/laboratory',
    name: 'Laboratory',
    component: () => import(/* webpackChunkName: "laboratory" */ '../views/Laboratory.vue'),
    meta:{
      title:'nav_laboratory'
    },
  },
  {
    path: '/laboratoryDetail',
    name: 'LaboratoryDetail',
    component: () => import(/* webpackChunkName: "laboratory" */ '../views/Laboratory/LaboratoryDetail.vue'),
    meta:{
      title:'nav_laboratory'
    },
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
